import VueRouter from 'vue-router'
import Login from "./views/Login/Login.vue";
import Home from "./views/Home/Home.vue";
import HomeContainer from "./components/tabbar/HomeContainer.vue";
import MemberContainer from "./components/tabbar/MemberContainer.vue";
import User from "./components/tabbar/user.vue";
import SOS from "./components/tabbar/SOS.vue";
import backdDtail from "./components/details/backdDtail.vue";
import ShopcarContainer from "./components/tabbar/ShopcarContainer.vue";
import SearchContainer from "./components/tabbar/SearchContainer.vue";


// 3. 创建路由对象
var router = new VueRouter({
    routes: [
        {path: '/', component: Login},
        {path: '/Navigation1',redirect: '/main',},
        {
            path: '/main',
            component: Home,
            children: [
                {path: '/Navigation1/sos-back-list', component: SOS},
                {path: "/Navigation1/task-back-list", component: MemberContainer},
                {path: "/Navigation1/user-back-list", component: User},
                {path: "/task-back-list/back-detail", component: backdDtail},
                {path: "/user-back-list/back-detail", component: backdDtail},
                {path: "/sos-back-list/back-detail", component: backdDtail},
            ]
        },
        {path: "/main/home", component: HomeContainer},
        {path: "shopcar", component: ShopcarContainer},
        {path: "search", component: SearchContainer},
    ],
    linkActiveClass: "mui-active"//为选中的路由添加样式
})
// 把路由对象暴露出去
export default router